<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
    <%@include file="/../../resource.jsp"%>
        <!DOCTYPE html>
        <html lang="zh-CN">

        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <script type="text/javascript" src="/static/jsLib/bootstrap-3.3.7/js/bootstrap.min.js"></script>
            <title>图书馆管理系统</title>
            <script src="/static/js/sys/book.js"></script>

        </head>

        <body>
            <div class="container-fuild">
                <h3>图书管理</h3>
                <hr>
                <div id="userToolbar" class="btn-group">
                    <button type="button" id="addBook" data-toggle="modal" class="btn btn-default">
				<i class="glyphicon glyphicon-plus"></i> 添加
			</button>
                    <button type="button" id="modifyBook" class="btn btn-default">
				<i class="glyphicon glyphicon-edit"></i> 修改
			</button>
                    <button type="button" id="removeBook" class="btn btn-default">
				<i class="glyphicon glyphicon-trash"></i> 删除
			</button>
                </div>
                <ul id="userContextMenu" class="dropdown-menu">
                    <li data-item="edit"><a> 修改</li>
       	             <li data-item="delete"><a> 删除</a></li>
                </ul>
                <table id="bookTable" data-show-export="true"></table>

                <!-- 模态框（Modal） -->
                <div class="modal fade" id="bookModal" role="dialog" data-backdrop="static" aria-hidden="true" style="margin-top: 80px;postion:absolute">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title">图书管理</h4>
                            </div>
                            <div class="modal-body">
                                <form id="bookForm" class="form-horizontal">
                                    <input type="hidden" id="id" name="id">
                                    <div id="bookFormName" class="form-group">
                                    <div class="col-sm-3 control-label">
                                        <label for="name"><span class="text-danger">*</span> 名称：</label>
                                        </div>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="name" name="name" placeholder="请输入名称">
                                            <span id="errorName" class="text-danger"></span>
                                        </div>
                                    </div>
                                    <div id="bookFormNumber" class="form-group">
                                    <div class="col-sm-3 control-label">
                                        <label for="number"><span class="text-danger">*</span> 数量：</label>
                                        </div>
                                        <div class="col-sm-8">
                                            <input type="number" class="form-control" id="number" name="number">
                                        </div>
                                    </div>
                                    <div id="bookFormAuthor" class="form-group">
									<div class="col-sm-3 control-label">
                                        <label for="author"><span class="text-danger">*</span> 作者：</label>
                                        </div>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" id="author" name="author">
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                              	<button type="button" class="btn btn-default" id="submit">
		                            <i class="glyphicon glyphicon-ok"></i>保存
		                        </button>
                                <button type="button" class="btn btn-default" id="closeModal">
		                            <i class="glyphicon glyphicon-remove"></i>关闭
		                        </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </body>

        </html>